#ifndef __STATISTICS_MODULE_H__
#define __STATISTICS_MODULE_H__

#include <linux/types.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/moduleparam.h>
#include <asm-i386/uaccess.h>

#include "monitoring-module.h"
#include "lib.h"

#define STATISTICS_MAJOR         200
#define STATISTICS_MINOR         200

int is_open;
int monitored_pid;
int monitored_call;
int owner_pid;
dev_t statistics_dev;
struct cdev *statistics_cdev;

// Funcions per accedir al modul
ssize_t read (struct file *f, char __user *buffer, size_t s, loff_t *off);
int ioctl (struct inode *i, struct file *f, unsigned int arg1, unsigned long arg2);
int open (struct inode *i, struct file *f);
int release (struct inode *i, struct file *f);

struct file_operations statistics_fops = {
	owner: THIS_MODULE,
	read: read,
	ioctl: ioctl,
	open: open,
	release: release,
};

#endif
